#include<stdio.h>
#include<stdlib.h>
void inplace_swap(int *x,int *y){
*y=*x^*y;
*x=*x^*y;
*y=*x^*y;
}
void reverse_arry(int a[],int cnt){
int first,last;
for(first=0,last=cnt-1;
first<=last;first++,last--)
inplace_swap(&a[first],&a[last]);
}

void main(){
int a[1000];
int cnt;
printf("input cnt:");
scanf("%d",&cnt);
int i;
printf("input a:");
for(i=0;i<cnt;i++){
scanf("%d",&a[i]);
}
reverse_arry(a,cnt);
for(i=0;i<cnt;i++)
{
printf("%d",a[i]);
}
}
